<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php e(Option::get('BLOG_TITLE')); ?></title>
    <link rel="stylesheet" href="<?php assets_url('libs/bootstrap/css/bootstrap.min.css') ?>">
    <link rel="stylesheet" href="<?php assets_url('libs/bootstrap/css/bootstrap-theme.min.css') ?>">
    <link rel="stylesheet" href="views/style.css">
</head>
<body>

<div class="blog-masthead">
    <div class="container">
        <nav class="blog-nav">
            <?php
            $navs = array(
                array('首页', 'index.php', basename($_SERVER['REQUEST_URI']) == 'index.php' || $_SERVER['REQUEST_URI'] == '/'),
                array('工作', 'index.php?cid=26', get('cid') == 26),
                array('生活', 'index.php?cid=24', get('cid') == 24),
                array('技术', 'index.php?cid=25', get('cid') == 25),
                array('关于', 'blog.php?id=43', get('id') == 43),
            );
            foreach ($navs as $nav) {
                $label = $nav[0];
                $href = $nav[1];
                $active = $nav[2];
                ?>
                <a class="blog-nav-item <?php if ($active) {
                    echo 'active';
                } ?>" href="<?php echo $href ?>"><?php echo $label; ?></a>
                <?php
            }
            ?>
        </nav>
    </div>
</div>

<div class="container">

    <div class="blog-header">
        <h1 class="blog-title"><?php echo Option::get('BLOG_TITLE'); ?></h1>
        <p class="lead blog-description"><?php echo Option::get('BLOG_DESCRIPTION'); ?></p>
    </div>

    <div class="row">

        <div class="col-sm-8 blog-main">

            <?php echo $__content; ?>

        </div><!-- /.blog-main -->

        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
            <div class="sidebar-module sidebar-module-inset">
                <h4>关于</h4>
                <p><?php echo Option::get('WIDGET_ABOUT_INFO'); ?></p>
            </div>
            <div class="sidebar-module">
                <h4>日期归档</h4>
                <ol class="list-unstyled">
                    <?php foreach (post_month_all() as $m => $label): ?>
                        <li><a href="index.php?m=<?php echo $m; ?>"><?php echo $label; ?></a></li>
                    <?php endforeach; ?>
                </ol>
            </div>
            <div class="sidebar-module">
                <h4>友情连接</h4>
                <ol class="list-unstyled">
                    <li><a href="//upliu.net/">开飞机的小蜗牛</a></li>
                    <li><a href="http://demo.upliu.net/snail-blog/">蜗牛博客系统</a></li>
                    <li><a href="http://demo.upliu.net">蜗牛程序演示站</a></li>
                </ol>
            </div>
        </div><!-- /.blog-sidebar -->

    </div><!-- /.row -->

</div>

<footer class="blog-footer">
    <p>
        <a href="#">Back to top</a>
    </p>
    <p>
        &copy;<?php echo date('Y'); ?>
        Powerd by <a href="http://demo.upliu.net/snail-blog/" target="_blank">小蜗牛博客系统</a>
        <a href="admin/">后台管理</a>
    </p>
</footer>

<script src="<?php assets_url('libs/jquery.min.js'); ?>"></script>
<script src="<?php assets_url('libs/bootstrap/js/bootstrap.min.js'); ?>"></script>

</body>
</html>